echo $genre ?> Albums in Jeremy's Music Collection
/* Get all artists with albums in this genre */
$sql = "select A.id, A.name, count(A.name) as cnt from artists A, albums B where A.id = B.artist_id and B.genre_id = '$id' group by name order by name";
$rs = run_query($sql);
while(($obj=mysql_fetch_object($rs))) {
$artist_name = htmlentities($obj->name);
$count = $obj->cnt;
$artist_id = $obj->id;
echo "
$artist_name
";
$sql = "select B.title, B.id, B.encoded from albums B where B.artist_id = '$artist_id' and B.genre_id = '$genre_id' order by title";
$rs2 = run_query($sql);
echo "